package com.oig.auth.api;

import com.oig.auth.api.factory.TenantInfoFallbackFactory;
import com.oig.sys.auth.vo.TenantInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;


@FeignClient(contextId = "tenantInfoService", value = "sys-auth-server", path="/tenant", fallbackFactory = TenantInfoFallbackFactory.class)
public interface TenantInfoService {

    @PostMapping("/getByCode/{code}")
    TenantInfoVo getByCode(@PathVariable("code") String code);

    @PostMapping("/info/{tenantId}")
    TenantInfoVo getById(@PathVariable("tenantId") Integer tenantId);

}
